/* -----------------------------------------------------------
 * Author: Marie Caswell
 * Testing Function: villageCard()

 * Description: Checks for the value of numActions after 
 * village card is played.
 -----------------------------------------------------------*/

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

void villageCard(int currentPlayer, struct gameState *state, int handPos);

int main(){

int seed = 1000;
int numPlayer = 2;
struct gameState G;
int k[10] = {adventurer, gardens, embargo, village, minion, mine, cutpurse, sea_hag, tribute, smithy};
memset(&G, 23, sizeof(struct gameState));   // clear the game state
initializeGame(numPlayer, k, seed, &G); // initialize a new game 

G.whoseTurn = 0;
G.hand[0][0] = village;

//numActions set to 1 at the beginning of each turn

printf("\nPre-Village Action Count: %d \n", G.numActions);

villageCard(0,&G,0);  //play village

printf("\nPost-Village Action Count: %d \n", G.numActions);

assert(G.numActions == 3); //confirm player actions increased by two

printf("\nTest passed.\n\n");

return 0;

 }